package be.g00glen00b.controller;

import org.jboss.resteasy.client.ProxyFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import be.g00glen00b.rest.RESTClient;

@Controller
public class MainController {
	
	private RESTClient client = ProxyFactory.create(RESTClient.class, RESTClient.URL);

	@RequestMapping(value = "/index.html")
	public String getIndex(ModelMap model) {
		model.addAttribute("user", client.getUser());
		return "index";
	}
}
